﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NhWeather.Register;

public class HoldingRegister : BaseRegister
{
    public HoldingRegister()
    {
        ControlCode = [0x03, 0x04];
        Random rd = new();
        Data = (short)rd.Next(0, 99);
    }

    public override void Generate()
    {
        Data = (short)(new Random().NextDouble() * ChangeAmplitude);
    }
}
